<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="/system/include/taglib.jsp"%>
<c:if test="${!requestScope.checked }">
	<jsp:forward page="/system/search/unisearch.jsp?module=ticket/ATM_reprint_form.jsp"></jsp:forward>
</c:if>
<c:if test="${requestScope.checked }">
<jsp:useBean id="date" class="java.util.Date" scope="page" />

<html>
<head>
<base href="${pageScope.basePath }">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>中山市中凯信息科技有限公司</title>
<link type="text/css" rel="stylesheet" href="system/css/style.css" />
<script type="text/javascript" language="javascript" src="system/js/public.js"></script>
<script type="text/javascript" language="javascript" src="system/js/DatePicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript" src="system/js/jquery-1.4.2.js"></script>
<script type="text/javascript" language="javascript" src="system/js/jquery.blockUI.js"></script>
<script type="text/javascript" language="javascript" src="system/js/json2.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(
	function ()
	{
		
		var taxinfo=JSON.parse('${requestScope.printinfo}');
		var ticketinfo=JSON.parse('${requestScope.ticketinfo}');
		var ticketamout=JSON.parse('${requestScope.ticketnum}');
		var mxh = new Array(taxinfo,ticketinfo,ticketamout); 
		alert("你总共要打印"+ticketamout.totalprint+"张税票，你有"+ticketamout.realticketnum+"张税票可用。");
			
		var result=$("input[name='ticketprint']").click(function(){
			window.showModalDialog('${pageScope.basePath }'+"system/ticket/ATM_ticket.jsp",mxh,"dialogWidth=760px;center=yes;resizable=no;status=no;scroll=yes;help=no");
		});
		if(result==1){
			parent.location.href="${pageScope.basePath }system/search/unisearch.jsp?module=ticket/ATM_reprint.do";
		}
		else{
			parent.location.href="${pageScope.basePath }system/ticket/ATM_reprint.do?ccdjh=${requestScope.carinfo.ccdjh }";
		}
		
	}
	);

</script>
</head>
<body>
<div class="main">
	<div class="position">当前位置: <a href="sysadm/desktop.jsp">桌 面</a> → 自助终端税票补打 </div>
	<div class="mainbody">
		<div class="operate_info">操作说明：带 * 号必填</div>
		<div class="table">
			<table width="100%" border="0" cellpadding="1" cellspacing="1" class="declare_form">
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
					<td colspan="4" height="30" bgcolor="#E2E8EB" style="font-size:14px;font-weight:bold;">车船登记信息</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right" width="15%">车主类别：</th>
					<td width="35%">
						<mytag:View name="czlb" table="com.zhongkai.model.book.TDmCcsCzlb" entityStringId="true" id="${requestScope.carinfo.czlbDm }"></mytag:View>
						${czlb.czlbMc }
					</td>
					<th align="right" width="15%">登记状态：</th>
					<td>
						<mytag:View name="djzt" table="com.zhongkai.model.book.TDmCcsDjzt" entityStringId="true" id="${requestScope.carinfo.djztDm }"></mytag:View>
						${djzt.djztMc }
					</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">纳税人编码：</th>
					<td>${requestScope.carinfo.nsrbm }</td>
					<th align="right">车船登记号：</th>
					<td>${requestScope.carinfo.ccdjh }</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">车主名称：</th>
					<td>${requestScope.carinfo.czMc }</td>
					<th align="right">
						<c:if test="${requestScope.carinfo.czlbDm=='02' }">身份证号码：</c:if>
					</th>
					<td>
						<c:if test="${requestScope.carinfo.czlbDm=='02' }">${requestScope.carinfo.sfzhm }</c:if>
					</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">车船牌照号码：</th>
					<td>${requestScope.carinfo.ccpzh }</td>
					<th align="right">车船类型：</th>
					<td>
						<mytag:View name="jjcclx" table="com.zhongkai.model.book.TDmCcsJjcclx" entityStringId="true" id="${requestScope.carinfo.jjcclxDm }"></mytag:View>
						${jjcclx.jjcclxMc }
					</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">车架号：</th>
					<td>${requestScope.carinfo.cjh }</td>
					<th align="right">&nbsp;</th>
					<td>&nbsp;</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">核定载重量（吨）：</th>
					<td>${requestScope.carinfo.hdzzl }</td>
					<th align="right">核定载客（人）：</th>
					<td>${requestScope.carinfo.hdzkl }</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">整备质量（吨）：</th>
					<td>${requestScope.carinfo.zbzl }</td>
					<th align="right">排气量：</th>
					<td>${requestScope.carinfo.pql }</td>
				</tr>
				<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
					<th align="right">应税起始年月：</th>
					<td>${requestScope.carinfo.sbqsny }</td>
					<th align="right">申报期限：</th>
					<td><fmt:formatDate type="date" pattern="yyyy" value="${date }" />-12-31</td>
				</tr>
			</table>
			<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_list" style="margin-top:10px;">
				<tr>
					<td colspan="10" height="30" bgcolor="#E2E8EB" style="font-size:14px;font-weight:bold;">打印资料</td>
				</tr>
				<tr>
					<th>品目</th>
					<th>所属时期（起）</th>
					<th>所属时期（止）</th>
					<th>计税依据<br>（吨/辆）</th>
					<th>税率<br>单位税额</th>
					<th>应缴<br>税额</th>
					<th>减免<br>类型</th>
					<th>减免<br>税额</th>
					<th>滞纳金</th>
					<th>应补退<br>税额</th>
				</tr>
				<logic:notEmpty name="taxinfo" scope="request">
					<logic:iterate id="taxlist" name="taxinfo" scope="request">
						<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" height="30">
							<td><mytag:View name="zspm" table="com.zhongkai.model.code.TCsZspm" entityStringId="true" id="${taxlist.zspmDm }" ></mytag:View>${zspm.zspmMc }</td>
							<td><fmt:formatDate type="date" pattern="yyyy-MM-dd" value="${taxlist.ssqqRq }" /></td>
							<td><fmt:formatDate type="date" pattern="yyyy-MM-dd" value="${taxlist.ssqzRq }" /></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.jsyj }" /></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.sl }" /></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.yjsJe }" /></td>
							<td><c:if test="${taxlist[1].jmlxDm!=null}"><mytag:View name="jmlx" table="com.zhongkai.model.code.TDmJmlx" entityStringId="true" id="${taxlist.jmlxDm}" ></mytag:View>${jmlx.jmlxMc }</c:if></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.jmsJe}" /></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.znj}" /></td>
							<td><fmt:formatNumber type="number" pattern="0.00" value="${taxlist.ybtJe}" /></td>
						</tr>
					</logic:iterate>
					<tr>
						<td colspan="10" class="form_button" style="padding-top:10px;">
							<input name="ticketprint" type="button" value="打印"/>
							<input type="button" value="返回" onClick="location.href=''"/>
						</td>
					</tr>
				</logic:notEmpty>
			</table>
		</div>
	</div>
</div>

</body>
</html>
</c:if>